package com.example.Config;

import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration  //配置类，一般和@Bean注解一起使用
public class MybatisPlusConfig {


    /**
     * 分页插件
     * @return
     */
    @Bean  // 注册到spring上下文
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor page = new PaginationInterceptor();
        page.setDialectType("mysql");
        return page;
    }

}